package com.study.four;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.io.ClassPathResource;

/**
 * @Author chenyeqing
 * @Date 2021/11/13 14:27
 */
@ComponentScan("com.study.four")
@Configuration
public class AppConfig10 {

    @Bean
    public PropertySourcesPlaceholderConfigurer propertyHolder() {
        PropertySourcesPlaceholderConfigurer property = new PropertySourcesPlaceholderConfigurer();
        ClassPathResource classPathResource = new ClassPathResource("four.properties");
        property.setLocation(classPathResource);
        return property;
    }
}
